package com.hy.kafka.controller;

import com.alibaba.fastjson.JSONObject;
import com.hy.kafka.service.KafkaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api
public class KafkaController {
    @Autowired
    private KafkaService kafkaService;

    @RequestMapping(value = "/sendMsg", method = RequestMethod.POST)
    @ApiOperation(value = "推送数据测试接口", httpMethod = "POST")
    public void checkout(@RequestBody JSONObject jsonObject) {
        kafkaService.sendMsg(jsonObject);
    }
}
